<template>
  <div>
    <div>{{count}}</div>
    <Son :count="count" @addCount='addCountFn'></Son>
  </div>
</template>

<script>
import {ref} from 'vue'
import Son from './Son.vue'
export default {
    name:'App',
    components:{Son},
    setup(){
        const count=ref(100)
        function addCountFn(value) {
            count.value+=value
        }
        return {count,addCountFn}
    }
}
</script>

<style>

</style>